<link rel="stylesheet" href="__STATIC__mobile/css/reset.css">
<link rel="stylesheet" href="__STATIC__mobile/css/regularmembers.css">
	  <?php if(!$is_mobile){  ?>
        <style>
html,body{
    height:100%;
    width:50%;
    margin:0 auto;
}
.nav{
    position:fixed;
    width:25%;

}
.morder_nav{
	position:absolute;
}
</style>
        <?php } ?>
        
<div class="membersbox pad50">
	<section class="myIntegral">
		<div class="Integral">
			<p>已兑换</p>
			<p style="font-size: 18px;"><?php echo $memberinfo['tixian'];?></p>
		</div>

		<div class="getpros clearfix"></div>

		<div class="mintegral_content IntegralDetail" id="service_lists">
			<h2>
				<span>兑换记录</span>
			</h2>
		</div>
	</section>
</div>
<include file="Common:nav" />


<script src="/Static/mobile/js/jquery-esn-autobrowse/jquery.esn.autobrowse.js"></script>
<script >

$(function() {
    //瀑布流
    var totalPage = '{$totalpage}';
     statusJson = {$status};
    console.log(statusJson);
    totalPage = parseInt(totalPage)+1;
    var max = totalPage > 100 ? 100 : totalPage;
    if (totalPage >= 1) {
    	servicelistautobrowse('service_lists', '/mobile/withdraw/lists', max);
    }

});


function servicelistautobrowse(dom, url, total) {
	
    $("#" + dom + "").autobrowse(
            {
                url: function(offset) {
                    //alert(url.indexOf('?'));//   如果url.indexOf("?")==-1   说明不包含 “?”
                    if (url.indexOf('?') < 1) {
                        return url + '?p=' + offset;
                    }
                    return url + '&p=' + offset;
                },
                template: function(response) {
                    return servicelistcallback(response);
                },
                itemsReturned: function(response) {
                    return response.length;
                },
                max: total,
                offset: 1,
                sensitivity: 100,
                loader: '<p style="text-align:center;padding:20px;">&nbsp;努力加载中...</p>',
                itemsReturned:function(response) {
                    return 1;
                },
                finished: function() {
                   // $(this).append('<p class="loadding mt20">555</p>')
                },
                onError: function() {
                },
                complete: function(response) {
                }
            }
    );
}




function servicelistcallback(response) {

    var markup = '';
	var UPYUN_DOMAIN = "<?php echo C("UPYUN_DOMAIN");?>";
	
	if(!response){
		markup = '暂无记录';		
	}
	
    if (typeof(response) == 'object') {
        for (var i in response) {
        		
        		
        	
        	
        	

        		var logtype = '<span style="color:#e1321c;">+'+response[i].atm_money+'</span>';     
                markup += '<div class="IntegralItem" >';
                markup += '<h3 style="width:80%;">'+response[i].realname+'</h3>';             
                markup += '<p>'+response[i].create_time+'</p>';
                markup += '<p>'+response[i].bankname+response[i].bankcard+'</p>';
                markup += '<em>'+statusJson[response[i].status]+'</em>';
                markup += logtype;
                markup += '</div>';
            

        }
    }
    return markup;
}

</script>